mesh *ray_intersect(vector& ro,vector& rd,vector& ip,float& dist,int &facenum,float rad=0.0f);
Parameter | Type | Description |
---|---|---|
ro | vector& | ray origin |
rd | vector& | ray direction |
ip | vector& | intersection point |
dist | float& | intersection distance |
facenum | int& | intersected face index into returned mesh |
rad | float | collision radius |
Returns the mesh object if a collision is detected, NULL on no collision.
This function implements the ray intersection virtual bsp_obect function for
the bsp faces included in a leaf node.
It passes the ray_intersect call to the same function from its objmesh
member variable.